home *** CD-ROM | disk | FTP | other *** search
/ Aminet 48 / Aminet 48 (2002)(GTI - Schatztruhe)[!][Apr 2002].iso / Aminet / text / edit / vim60rt.lha / Vim / vim60 / ftplugin.vim < prev    next >
Encoding:
Text File  |  2001-09-18  |  632 b   |  24 lines

  1. " Vim support file to switch on loading plugins for file types
  2. "
  3. " Maintainer:    Bram Moolenaar <Bram@vim.org>
  4. " Last change:    2001 Sep 18
  5.  
  6. if exists("did_load_ftplugin")
  7.   finish
  8. endif
  9. let did_load_ftplugin = 1
  10.  
  11. augroup filetypeplugin
  12.   au FileType * call s:LoadFTPlugin()
  13.   func! s:LoadFTPlugin()
  14.     if expand("<amatch>") != ""
  15.       if &cpo =~# "S"
  16.     " In compatible mode options are reset to the global values, need to
  17.     " set the local values also when a plugin was already used.
  18.     unlet b:did_ftplugin
  19.       endif
  20.       runtime! ftplugin/<amatch>.vim ftplugin/<amatch>_*.vim ftplugin/<amatch>/*.vim
  21.     endif
  22.   endfunc
  23. augroup END
  24.